function compareDate(dateStart, dateEnd)
{
  if (dateStart && dateEnd && (dateStart>dateEnd))
		return false;
  else
    return true;
}

function checkIsNumeric(value) {
    if (isNaN(value))
        return false;
    else
        return true;
}


//when enter input
$('#user-search-form input').keyup(function(e) {
    if (e.which == 13) {
        $('#btn-search').trigger('click');
    }
})

//check all
function clickCheckAll() {
    var totalInput = $('.branchId').length;
    var totalChecked = $('.branchId:checked').length;
    
    if (totalInput != totalChecked) {
        $('.branchId').attr('checked', 'checked');
    } else {
        $('.branchId').attr('checked', '');
    }
}